from datetime import datetime

from sqlalchemy import UniqueConstraint

from src.baseapp.model import db, CustomDbModel


class DeviceTypeSignalingMappingModel(CustomDbModel):
    __tablename__ = 'type_signaling_mapping'
    __table_args__ = (UniqueConstraint('device_type_id', 'signaling_id', name='uq_sign'),)

    mapping_id = db.Column(db.Integer, primary_key=True, autoincrement=True)

    # 设备id
    device_type_id = db.Column(db.Integer, nullable=False)

    # 信令id
    signaling_id = db.Column(db.Integer, nullable=False)
